package com.hyz.assetManager.controller;

import com.hyz.assetManager.service.UploadAssetService;
import com.hyz.pkg.pojo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author HGD
 * @date 2022/9/26 14:25
 */
@RestController
@RequestMapping("/assetManager")
public class UploadAssetController {
    @Autowired
    private UploadAssetService uploadAssetService;

    @PostMapping("/upload")
    public ResponseResult<String> uploadAsset(@RequestBody MultipartFile file) {
        return uploadAssetService.uploadAsset(file);
    }


    @GetMapping("/hello")
    String hello() {
        return uploadAssetService.hello();
    }

}
